{% extends "base_blog.html" %}

{% block title %}Blog | {{ object.title|escape }} | douglasjarquin.com{% endblock %}

{% block content %}

<h3>{{ object.title }}</h3> 

{{ object.body_html }}

<p>By {{ object.author.first_name }} on {{ object.published_on|date:"F j, Y" }}</p>

{% include "includes/adsense_468x60.html" %}

<h2>Comments</h2>
{% load markup %}
{% load comments.comments %}
{% get_comment_list for blog.entry object.id as comment_list %}

{% ifequal comments_count 0 %}
	<p>No comments posted yet. Go for it!</p>
{% else %}
{% for comment in comment_list %}
    {{ forloop.counter }}
    <p>{{ comment.user.first_name }} on {{ comment.submit_date|date:"F j, Y" }} @ {{ comment.submit_date|date:"P" }}</p>
    {{ comment.comment|striptags|urlize|textile }}
{% endfor %}
{% endifequal %}

{% if object.enable_comments %}

{% if request.openid %}
<h3>Post a comment</h3>
{% comment_form for blog.entry object.id  %}
{% else %}
<h3>Sign in with your OpenID</h3>
<form method="post" action="/openid/">
<p><input class="openid" type="text" name="openid_url"></p>
<p><input type="submit" value="Sign in"></p>
</form>
{% endif %}

{% else %}
<p>Comments are off for this entry. Must be pretty bad out there.</p>
{% endif %}

{% endblock %}